home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
et
/
et3_0-a1.lha
/
et3
/
src
/
WindowSystem.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-08-19
|
2KB
|
89 lines
#ifndef WindowSystem_First
#ifdef __GNUG__
//pragma once
#pragma interface
#endif
#define WindowSystem_First
#include "Port.h"
#include "System.h"
#include "Symbol.h"
enum WindowType {
eWinPlain,
eWinStandard,
eWinDialog,
eWinPulldownMenu,
eWinPopupMenu,
eWinIcon
};
enum WindowFlags {
eWinDefault = 0,
eWinBlock = 1,
eWinFixed = 2,
eWinCanClose = 4
};
class VObject;
class Window;
class Window;
class WindowPort;
class Data;
class WindowColorMap;
//---- WindowSystem ------------------------------------------------------------
class WindowSystem : public SysEvtHandler {
public:
static bool batch;
static u_long lasttime;
static bool fullscreen;
static WindowPort *grabport;
static Token lastClick;
static int Clicks;
static Rectangle screenRect;
static OrdCollection *allwins;
static WindowColorMap *wcmap;
static void WSInit();
public:
MetaDef(WindowSystem);
WindowSystem();
void InitNew();
virtual ~WindowSystem();
void Update();
virtual void Init();
virtual WindowPort *MakeWindow(Window *bw, WindowType wt, GrCursor curs);
virtual void RemoveWindow(WindowPort*);
void AddWindow(WindowPort*);
virtual FontManager *MakeFontManager();
virtual DevBitmap *MakeDevBitmap(Point sz, u_short *data, u_short depth,
bool freedata= FALSE, u_short pad= 2);
virtual void graphicDelay(unsigned int);
virtual void DevBell(long duration);
virtual int DevHaveSelection(Data *data);
virtual void ExtCommand(int from, char *req, char *args, int len,
char *&ret, int &retlen);
virtual VObject *MakeWindowBorder(WindowType wt,
VObject *in, char *title, bool block, bool fixed);
void SetWait();
void ResetWait();
virtual void DevCheckSelection();
};
extern WindowSystem *gWindowSystem;
extern bool gColor;
extern int gDepth;
extern int gMaxDepth;
extern bool gGreyScale;
inline void GraphicDelay(unsigned int duration)
{ gWindowSystem->graphicDelay(duration); }
#endif